#ifndef PROTOTYPE_H
#define PROTOTYPE_H

#include "ui_prototype.h"
#include "Model/ssm.h"
#include "WorkerThread.h"

class Proto : public QMainWindow, private Ui::mainForm
{
	Q_OBJECT

public:
	friend class WorkerThread;
	Proto(QMainWindow *parent = 0);
	void setupLCDs();

public slots:
	void openRoute();
	void runModel();
	void saveRoute();
	void close();
	void Exit();
	double distance(double, double, double, double);
	bool check(double, double);
	void updateDashboard();
	void changeWay();
	void startWorker();

private:
	int    nlegs;		//number of legs in the route/plan files
	bool   changed;		//for keeping track of changes
	bool   loaded;		//determines if a route and plan file have been loaded
	bool   startG;		//sees if you should be graphing right now
	char   version[21];   	// Version of read_route/write_route and ssm.h
  	char   comment[201];  	// Comment on this route.
  	char   units[21];       // "metric" or "english"
	char r_file[1024];	//route file
	char p_file[1024];	//plan file
	Route route;		//route info
	int currentLeg;		//leg we think we are on
	char buffer[125];	//stream from car 
	int Time,speed, odometer,tempMotor, tempCont,voltage,current;
	double charge;
	bool running;
				//real time data

	float DELTADISTANCE, 	//default values read into from dasboard.defaults
		MAXMOTORTEMP,
		MAXCONTTEMP,
		MAXVOLTAGE,
		MINVOLTAGE,
		MAXCURRENT,	
		MINCURRENT;

};


#endif
